# -*- coding: utf-8 -*-
"""
@Time    : 2021/4/27 13:22
@Author  : jamon
"""

import time


class RpcIndex(object):
    last_time = int(time.time())
    last_index = 1

    @classmethod
    def next(cls) -> str:
        now = int(time.time())

        if cls.last_time == now:
            cls.last_index += 1
        else:
            cls.last_time = now
            cls.last_index = 1

        return "{}#{}".format(cls.last_time, cls.last_index)
